import lejos.nxt.LCD;
import lejos.nxt.SensorPort;
import lejos.nxt.UltrasonicSensor;

public class TestSonar {
	
public static void main(String[] args) throws Exception {
		
		UltrasonicSensor s = new UltrasonicSensor(SensorPort.S2);
		
		while(true){
			LCD.drawString("Dist: " + s.getDistance(), 0, 2);
			LCD.drawString("Range: " + s.getRange(), 0, 3);
		}
	
	}
	
	
}
